package com.base.card.domain.bo;
import com.base.common.core.domain.BaseEntity;
import com.base.common.core.validate.AddGroup;
import com.base.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

/**
 * 密码卡证书业务对象 t_crypt_card_cert
 *
 * @author base
 * @date 2023-10-17
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class TCryptCardCertBo extends BaseEntity {

    /**
     * 卡编码(初始+3位数字自增)
     */
    @NotBlank(message = "卡编码(初始+3位数字自增)不能为空", groups = { EditGroup.class })
    private String cardCode;

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pubkey;

    /**
     * 签名证书序列号
     */
    @NotBlank(message = "签名证书序列号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String certSn;

    /**
     * 签名证书主体dn
     */
    @NotBlank(message = "签名证书主体dn不能为空", groups = { AddGroup.class, EditGroup.class })
    private String certDn;

    /**
     * 签名证书生效时间
     */
    @NotNull(message = "签名证书生效时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 签名证书到期时间
     */
    @NotNull(message = "签名证书到期时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date expireTime;

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operator;

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 签名证书状态(1-正常 2-过期 0-失效)
     */
    @NotBlank(message = "签名证书状态(1-正常 2-过期 0-失效)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String certStatus;

    /**
     * ca证书内容
     */
    @NotBlank(message = "ca证书内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String caCertContent;

    /**
     * 签名证书内容
     */
    @NotBlank(message = "签名证书内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String encPrikeyContent;

    /**
     * 加密证书内容
     */
    @NotBlank(message = "加密证书内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String encCertContent;

    /**
     * 加密私钥证书内容
     */
    @NotBlank(message = "加密私钥证书内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String
signCertContent;


}
